3.4.79 \(\int x^2 (a+b \log (c (d+e x)^n)) (f+g \log (c (d+e x)^n)) \, dx\) [379]

3.4.79.1 Optimal result
3.4.79.2 Mathematica [A] (verified)
3.4.79.3 Rubi [A] (verified)
3.4.79.4 Maple [A] (verified)
3.4.79.5 Fricas [A] (verification not implemented)
3.4.79.6 Sympy [A] (verification not implemented)
3.4.79.7 Maxima [A] (verification not implemented)
3.4.79.8 Giac [B] (verification not implemented)
3.4.79.9 Mupad [B] (verification not implemented)

3.4.79.1 Optimal result

Integrand size = 32, antiderivative size = 258 \[ \int x^2 \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (f+g \log \left (c (d+e x)^n\right )\right ) \, dx=\frac {2 b d^2 g n^2 x}{e^2}-\frac {b d g n^2 (d+e x)^2}{2 e^3}+\frac {2 b g n^2 (d+e x)^3}{27 e^3}-\frac {b d^3 g n^2 \log ^2(d+e x)}{3 e^3}+\frac {1}{3} x^3 \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (f+g \log \left (c (d+e x)^n\right )\right )-\frac {d^2 n (d+e x) \left (b f+a g+2 b g \log \left (c (d+e x)^n\right )\right )}{e^3}+\frac {d n (d+e x)^2 \left (b f+a g+2 b g \log \left (c (d+e x)^n\right )\right )}{2 e^3}-\frac {n (d+e x)^3 \left (b f+a g+2 b g \log \left (c (d+e x)^n\right )\right )}{9 e^3}+\frac {d^3 n \log (d+e x) \left (b f+a g+2 b g \log \left (c (d+e x)^n\right )\right )}{3 e^3} \]

output
2*b*d^2*g*n^2*x/e^2-1/2*b*d*g*n^2*(e*x+d)^2/e^3+2/27*b*g*n^2*(e*x+d)^3/e^3 
-1/3*b*d^3*g*n^2*ln(e*x+d)^2/e^3+1/3*x^3*(a+b*ln(c*(e*x+d)^n))*(f+g*ln(c*( 
e*x+d)^n))-d^2*n*(e*x+d)*(b*f+a*g+2*b*g*ln(c*(e*x+d)^n))/e^3+1/2*d*n*(e*x+ 
d)^2*(b*f+a*g+2*b*g*ln(c*(e*x+d)^n))/e^3-1/9*n*(e*x+d)^3*(b*f+a*g+2*b*g*ln 
(c*(e*x+d)^n))/e^3+1/3*d^3*n*ln(e*x+d)*(b*f+a*g+2*b*g*ln(c*(e*x+d)^n))/e^3
 
3.4.79.2 Mathematica [A] (verified)

Time = 0.13 (sec) , antiderivative size = 205, normalized size of antiderivative = 0.79 \[ \int x^2 \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (f+g \log \left (c (d+e x)^n\right )\right ) \, dx=\frac {e x \left (3 a \left (-6 d^2 g n+3 d e g n x+2 e^2 (3 f-g n) x^2\right )+b n \left (d^2 (-18 f+66 g n)+3 d e (3 f-5 g n) x+2 e^2 (-3 f+2 g n) x^2\right )\right )+18 d^3 (b f+a g) n \log (d+e x)-6 \left (-3 a e^3 g x^3+b \left (11 d^3 g n+6 d^2 e g n x-3 d e^2 g n x^2+e^3 (-3 f+2 g n) x^3\right )\right ) \log \left (c (d+e x)^n\right )+18 b g \left (d^3+e^3 x^3\right ) \log ^2\left (c (d+e x)^n\right )}{54 e^3} \]

input
Integrate[x^2*(a + b*Log[c*(d + e*x)^n])*(f + g*Log[c*(d + e*x)^n]),x]
 
output
(e*x*(3*a*(-6*d^2*g*n + 3*d*e*g*n*x + 2*e^2*(3*f - g*n)*x^2) + b*n*(d^2*(- 
18*f + 66*g*n) + 3*d*e*(3*f - 5*g*n)*x + 2*e^2*(-3*f + 2*g*n)*x^2)) + 18*d 
^3*(b*f + a*g)*n*Log[d + e*x] - 6*(-3*a*e^3*g*x^3 + b*(11*d^3*g*n + 6*d^2* 
e*g*n*x - 3*d*e^2*g*n*x^2 + e^3*(-3*f + 2*g*n)*x^3))*Log[c*(d + e*x)^n] + 
18*b*g*(d^3 + e^3*x^3)*Log[c*(d + e*x)^n]^2)/(54*e^3)
 
3.4.79.3 Rubi [A] (verified)

Time = 0.51 (sec) , antiderivative size = 226, normalized size of antiderivative = 0.88, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.188, Rules used = {2883, 2858, 25, 27, 2772, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int x^2 \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (g \log \left (c (d+e x)^n\right )+f\right ) \, dx\)

\(\Big \downarrow \) 2883

\(\displaystyle \frac {1}{3} x^3 \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (g \log \left (c (d+e x)^n\right )+f\right )-\frac {1}{3} e n \int \frac {x^3 \left (b f+a g+2 b g \log \left (c (d+e x)^n\right )\right )}{d+e x}dx\)

\(\Big \downarrow \) 2858

\(\displaystyle \frac {1}{3} x^3 \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (g \log \left (c (d+e x)^n\right )+f\right )-\frac {1}{3} n \int \frac {x^3 \left (b f+a g+2 b g \log \left (c (d+e x)^n\right )\right )}{d+e x}d(d+e x)\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {1}{3} n \int -\frac {x^3 \left (b f+a g+2 b g \log \left (c (d+e x)^n\right )\right )}{d+e x}d(d+e x)+\frac {1}{3} x^3 \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (g \log \left (c (d+e x)^n\right )+f\right )\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {n \int -\frac {e^3 x^3 \left (b f+a g+2 b g \log \left (c (d+e x)^n\right )\right )}{d+e x}d(d+e x)}{3 e^3}+\frac {1}{3} x^3 \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (g \log \left (c (d+e x)^n\right )+f\right )\)

\(\Big \downarrow \) 2772

\(\displaystyle \frac {n \left (-2 b g n \int \left (\frac {\log (d+e x) d^3}{d+e x}-3 d^2+\frac {3}{2} (d+e x) d-\frac {1}{3} (d+e x)^2\right )d(d+e x)+d^3 \log (d+e x) \left (a g+2 b g \log \left (c (d+e x)^n\right )+b f\right )-3 d^2 (d+e x) \left (a g+2 b g \log \left (c (d+e x)^n\right )+b f\right )+\frac {3}{2} d (d+e x)^2 \left (a g+2 b g \log \left (c (d+e x)^n\right )+b f\right )-\frac {1}{3} (d+e x)^3 \left (a g+2 b g \log \left (c (d+e x)^n\right )+b f\right )\right )}{3 e^3}+\frac {1}{3} x^3 \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (g \log \left (c (d+e x)^n\right )+f\right )\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {n \left (d^3 \log (d+e x) \left (a g+2 b g \log \left (c (d+e x)^n\right )+b f\right )-3 d^2 (d+e x) \left (a g+2 b g \log \left (c (d+e x)^n\right )+b f\right )+\frac {3}{2} d (d+e x)^2 \left (a g+2 b g \log \left (c (d+e x)^n\right )+b f\right )-\frac {1}{3} (d+e x)^3 \left (a g+2 b g \log \left (c (d+e x)^n\right )+b f\right )-2 b g n \left (\frac {1}{2} d^3 \log ^2(d+e x)-3 d^2 (d+e x)+\frac {3}{4} d (d+e x)^2-\frac {1}{9} (d+e x)^3\right )\right )}{3 e^3}+\frac {1}{3} x^3 \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (g \log \left (c (d+e x)^n\right )+f\right )\)

input
Int[x^2*(a + b*Log[c*(d + e*x)^n])*(f + g*Log[c*(d + e*x)^n]),x]
 
output
(x^3*(a + b*Log[c*(d + e*x)^n])*(f + g*Log[c*(d + e*x)^n]))/3 + (n*(-2*b*g 
*n*(-3*d^2*(d + e*x) + (3*d*(d + e*x)^2)/4 - (d + e*x)^3/9 + (d^3*Log[d + 
e*x]^2)/2) - 3*d^2*(d + e*x)*(b*f + a*g + 2*b*g*Log[c*(d + e*x)^n]) + (3*d 
*(d + e*x)^2*(b*f + a*g + 2*b*g*Log[c*(d + e*x)^n]))/2 - ((d + e*x)^3*(b*f 
 + a*g + 2*b*g*Log[c*(d + e*x)^n]))/3 + d^3*Log[d + e*x]*(b*f + a*g + 2*b* 
g*Log[c*(d + e*x)^n])))/(3*e^3)
 

3.4.79.3.1 Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 2772
Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*(x_)^(m_.)*((d_) + (e_.)*(x_)^(r_ 
.))^(q_.), x_Symbol] :> With[{u = IntHide[x^m*(d + e*x^r)^q, x]}, Simp[(a + 
 b*Log[c*x^n])   u, x] - Simp[b*n   Int[SimplifyIntegrand[u/x, x], x], x]] 
/; FreeQ[{a, b, c, d, e, n, r}, x] && IGtQ[q, 0] && IntegerQ[m] &&  !(EqQ[q 
, 1] && EqQ[m, -1])
 

rule 2858
Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((f_.) + (g_ 
.)*(x_))^(q_.)*((h_.) + (i_.)*(x_))^(r_.), x_Symbol] :> Simp[1/e   Subst[In 
t[(g*(x/e))^q*((e*h - d*i)/e + i*(x/e))^r*(a + b*Log[c*x^n])^p, x], x, d + 
e*x], x] /; FreeQ[{a, b, c, d, e, f, g, h, i, n, p, q, r}, x] && EqQ[e*f - 
d*g, 0] && (IGtQ[p, 0] || IGtQ[r, 0]) && IntegerQ[2*r]
 

rule 2883
Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))*((f_.) + Log[(c_.) 
*((d_) + (e_.)*(x_))^(n_.)]*(g_.))*(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)* 
(a + b*Log[c*(d + e*x)^n])*((f + g*Log[c*(d + e*x)^n])/(m + 1)), x] - Simp[ 
e*(n/(m + 1))   Int[(x^(m + 1)*(b*f + a*g + 2*b*g*Log[c*(d + e*x)^n]))/(d + 
 e*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, n, m}, x] && NeQ[m, -1]
 
3.4.79.4 Maple [A] (verified)

Time = 0.66 (sec) , antiderivative size = 354, normalized size of antiderivative = 1.37

method result size
parallelrisch \(\frac {18 a \,e^{3} f \,x^{3}-66 b \,d^{3} g \,n^{2}-12 x^{3} \ln \left (c \left (e x +d \right )^{n}\right ) b \,e^{3} g n -102 \ln \left (e x +d \right ) b \,d^{3} g \,n^{2}+18 \ln \left (e x +d \right ) a \,d^{3} g n +18 \ln \left (e x +d \right ) b \,d^{3} f n -15 b d \,e^{2} g \,n^{2} x^{2}+66 b \,d^{2} e g \,n^{2} x +18 a \,d^{3} g n +18 b \,d^{3} f n +4 b \,e^{3} g \,n^{2} x^{3}-6 n a \,e^{3} g \,x^{3}-6 n b \,e^{3} f \,x^{3}-36 x \ln \left (c \left (e x +d \right )^{n}\right ) b \,d^{2} e g n +18 x^{2} \ln \left (c \left (e x +d \right )^{n}\right ) b d \,e^{2} g n +18 x^{3} \ln \left (c \left (e x +d \right )^{n}\right )^{2} b \,e^{3} g +18 x^{3} \ln \left (c \left (e x +d \right )^{n}\right ) a \,e^{3} g +18 x^{3} \ln \left (c \left (e x +d \right )^{n}\right ) b \,e^{3} f +36 \ln \left (c \left (e x +d \right )^{n}\right ) b \,d^{3} g n +18 \ln \left (c \left (e x +d \right )^{n}\right )^{2} b \,d^{3} g -18 a \,d^{2} e g n x -18 b \,d^{2} e f n x +9 a d \,e^{2} g n \,x^{2}+9 b d \,e^{2} f n \,x^{2}}{54 e^{3}}\) \(354\)
risch \(\text {Expression too large to display}\) \(1785\)

input
int(x^2*(a+b*ln(c*(e*x+d)^n))*(f+g*ln(c*(e*x+d)^n)),x,method=_RETURNVERBOS 
E)
 
output
1/54*(18*a*e^3*f*x^3-66*b*d^3*g*n^2-12*x^3*ln(c*(e*x+d)^n)*b*e^3*g*n-102*l 
n(e*x+d)*b*d^3*g*n^2+18*ln(e*x+d)*a*d^3*g*n+18*ln(e*x+d)*b*d^3*f*n-15*b*d* 
e^2*g*n^2*x^2+66*b*d^2*e*g*n^2*x+18*a*d^3*g*n+18*b*d^3*f*n+4*b*e^3*g*n^2*x 
^3-6*n*a*e^3*g*x^3-6*n*b*e^3*f*x^3-36*x*ln(c*(e*x+d)^n)*b*d^2*e*g*n+18*x^2 
*ln(c*(e*x+d)^n)*b*d*e^2*g*n+18*x^3*ln(c*(e*x+d)^n)^2*b*e^3*g+18*x^3*ln(c* 
(e*x+d)^n)*a*e^3*g+18*x^3*ln(c*(e*x+d)^n)*b*e^3*f+36*ln(c*(e*x+d)^n)*b*d^3 
*g*n+18*ln(c*(e*x+d)^n)^2*b*d^3*g-18*a*d^2*e*g*n*x-18*b*d^2*e*f*n*x+9*a*d* 
e^2*g*n*x^2+9*b*d*e^2*f*n*x^2)/e^3
 
3.4.79.5 Fricas [A] (verification not implemented)

Time = 0.29 (sec) , antiderivative size = 329, normalized size of antiderivative = 1.28 \[ \int x^2 \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (f+g \log \left (c (d+e x)^n\right )\right ) \, dx=\frac {18 \, b e^{3} g x^{3} \log \left (c\right )^{2} + 2 \, {\left (2 \, b e^{3} g n^{2} + 9 \, a e^{3} f - 3 \, {\left (b e^{3} f + a e^{3} g\right )} n\right )} x^{3} - 3 \, {\left (5 \, b d e^{2} g n^{2} - 3 \, {\left (b d e^{2} f + a d e^{2} g\right )} n\right )} x^{2} + 18 \, {\left (b e^{3} g n^{2} x^{3} + b d^{3} g n^{2}\right )} \log \left (e x + d\right )^{2} + 6 \, {\left (11 \, b d^{2} e g n^{2} - 3 \, {\left (b d^{2} e f + a d^{2} e g\right )} n\right )} x + 6 \, {\left (3 \, b d e^{2} g n^{2} x^{2} - 6 \, b d^{2} e g n^{2} x - 11 \, b d^{3} g n^{2} - {\left (2 \, b e^{3} g n^{2} - 3 \, {\left (b e^{3} f + a e^{3} g\right )} n\right )} x^{3} + 3 \, {\left (b d^{3} f + a d^{3} g\right )} n + 6 \, {\left (b e^{3} g n x^{3} + b d^{3} g n\right )} \log \left (c\right )\right )} \log \left (e x + d\right ) + 6 \, {\left (3 \, b d e^{2} g n x^{2} - 6 \, b d^{2} e g n x - {\left (2 \, b e^{3} g n - 3 \, b e^{3} f - 3 \, a e^{3} g\right )} x^{3}\right )} \log \left (c\right )}{54 \, e^{3}} \]

input
integrate(x^2*(a+b*log(c*(e*x+d)^n))*(f+g*log(c*(e*x+d)^n)),x, algorithm=" 
fricas")
 
output
1/54*(18*b*e^3*g*x^3*log(c)^2 + 2*(2*b*e^3*g*n^2 + 9*a*e^3*f - 3*(b*e^3*f 
+ a*e^3*g)*n)*x^3 - 3*(5*b*d*e^2*g*n^2 - 3*(b*d*e^2*f + a*d*e^2*g)*n)*x^2 
+ 18*(b*e^3*g*n^2*x^3 + b*d^3*g*n^2)*log(e*x + d)^2 + 6*(11*b*d^2*e*g*n^2 
- 3*(b*d^2*e*f + a*d^2*e*g)*n)*x + 6*(3*b*d*e^2*g*n^2*x^2 - 6*b*d^2*e*g*n^ 
2*x - 11*b*d^3*g*n^2 - (2*b*e^3*g*n^2 - 3*(b*e^3*f + a*e^3*g)*n)*x^3 + 3*( 
b*d^3*f + a*d^3*g)*n + 6*(b*e^3*g*n*x^3 + b*d^3*g*n)*log(c))*log(e*x + d) 
+ 6*(3*b*d*e^2*g*n*x^2 - 6*b*d^2*e*g*n*x - (2*b*e^3*g*n - 3*b*e^3*f - 3*a* 
e^3*g)*x^3)*log(c))/e^3
 
3.4.79.6 Sympy [A] (verification not implemented)

Time = 1.17 (sec) , antiderivative size = 384, normalized size of antiderivative = 1.49 \[ \int x^2 \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (f+g \log \left (c (d+e x)^n\right )\right ) \, dx=\begin {cases} \frac {a d^{3} g \log {\left (c \left (d + e x\right )^{n} \right )}}{3 e^{3}} - \frac {a d^{2} g n x}{3 e^{2}} + \frac {a d g n x^{2}}{6 e} + \frac {a f x^{3}}{3} - \frac {a g n x^{3}}{9} + \frac {a g x^{3} \log {\left (c \left (d + e x\right )^{n} \right )}}{3} + \frac {b d^{3} f \log {\left (c \left (d + e x\right )^{n} \right )}}{3 e^{3}} - \frac {11 b d^{3} g n \log {\left (c \left (d + e x\right )^{n} \right )}}{9 e^{3}} + \frac {b d^{3} g \log {\left (c \left (d + e x\right )^{n} \right )}^{2}}{3 e^{3}} - \frac {b d^{2} f n x}{3 e^{2}} + \frac {11 b d^{2} g n^{2} x}{9 e^{2}} - \frac {2 b d^{2} g n x \log {\left (c \left (d + e x\right )^{n} \right )}}{3 e^{2}} + \frac {b d f n x^{2}}{6 e} - \frac {5 b d g n^{2} x^{2}}{18 e} + \frac {b d g n x^{2} \log {\left (c \left (d + e x\right )^{n} \right )}}{3 e} - \frac {b f n x^{3}}{9} + \frac {b f x^{3} \log {\left (c \left (d + e x\right )^{n} \right )}}{3} + \frac {2 b g n^{2} x^{3}}{27} - \frac {2 b g n x^{3} \log {\left (c \left (d + e x\right )^{n} \right )}}{9} + \frac {b g x^{3} \log {\left (c \left (d + e x\right )^{n} \right )}^{2}}{3} & \text {for}\: e \neq 0 \\\frac {x^{3} \left (a + b \log {\left (c d^{n} \right )}\right ) \left (f + g \log {\left (c d^{n} \right )}\right )}{3} & \text {otherwise} \end {cases} \]

input
integrate(x**2*(a+b*ln(c*(e*x+d)**n))*(f+g*ln(c*(e*x+d)**n)),x)
 
output
Piecewise((a*d**3*g*log(c*(d + e*x)**n)/(3*e**3) - a*d**2*g*n*x/(3*e**2) + 
 a*d*g*n*x**2/(6*e) + a*f*x**3/3 - a*g*n*x**3/9 + a*g*x**3*log(c*(d + e*x) 
**n)/3 + b*d**3*f*log(c*(d + e*x)**n)/(3*e**3) - 11*b*d**3*g*n*log(c*(d + 
e*x)**n)/(9*e**3) + b*d**3*g*log(c*(d + e*x)**n)**2/(3*e**3) - b*d**2*f*n* 
x/(3*e**2) + 11*b*d**2*g*n**2*x/(9*e**2) - 2*b*d**2*g*n*x*log(c*(d + e*x)* 
*n)/(3*e**2) + b*d*f*n*x**2/(6*e) - 5*b*d*g*n**2*x**2/(18*e) + b*d*g*n*x** 
2*log(c*(d + e*x)**n)/(3*e) - b*f*n*x**3/9 + b*f*x**3*log(c*(d + e*x)**n)/ 
3 + 2*b*g*n**2*x**3/27 - 2*b*g*n*x**3*log(c*(d + e*x)**n)/9 + b*g*x**3*log 
(c*(d + e*x)**n)**2/3, Ne(e, 0)), (x**3*(a + b*log(c*d**n))*(f + g*log(c*d 
**n))/3, True))
 
3.4.79.7 Maxima [A] (verification not implemented)

Time = 0.20 (sec) , antiderivative size = 274, normalized size of antiderivative = 1.06 \[ \int x^2 \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (f+g \log \left (c (d+e x)^n\right )\right ) \, dx=\frac {1}{3} \, b g x^{3} \log \left ({\left (e x + d\right )}^{n} c\right )^{2} + \frac {1}{3} \, b f x^{3} \log \left ({\left (e x + d\right )}^{n} c\right ) + \frac {1}{3} \, a g x^{3} \log \left ({\left (e x + d\right )}^{n} c\right ) + \frac {1}{3} \, a f x^{3} + \frac {1}{18} \, b e f n {\left (\frac {6 \, d^{3} \log \left (e x + d\right )}{e^{4}} - \frac {2 \, e^{2} x^{3} - 3 \, d e x^{2} + 6 \, d^{2} x}{e^{3}}\right )} + \frac {1}{18} \, a e g n {\left (\frac {6 \, d^{3} \log \left (e x + d\right )}{e^{4}} - \frac {2 \, e^{2} x^{3} - 3 \, d e x^{2} + 6 \, d^{2} x}{e^{3}}\right )} + \frac {1}{54} \, {\left (6 \, e n {\left (\frac {6 \, d^{3} \log \left (e x + d\right )}{e^{4}} - \frac {2 \, e^{2} x^{3} - 3 \, d e x^{2} + 6 \, d^{2} x}{e^{3}}\right )} \log \left ({\left (e x + d\right )}^{n} c\right ) + \frac {{\left (4 \, e^{3} x^{3} - 15 \, d e^{2} x^{2} - 18 \, d^{3} \log \left (e x + d\right )^{2} + 66 \, d^{2} e x - 66 \, d^{3} \log \left (e x + d\right )\right )} n^{2}}{e^{3}}\right )} b g \]

input
integrate(x^2*(a+b*log(c*(e*x+d)^n))*(f+g*log(c*(e*x+d)^n)),x, algorithm=" 
maxima")
 
output
1/3*b*g*x^3*log((e*x + d)^n*c)^2 + 1/3*b*f*x^3*log((e*x + d)^n*c) + 1/3*a* 
g*x^3*log((e*x + d)^n*c) + 1/3*a*f*x^3 + 1/18*b*e*f*n*(6*d^3*log(e*x + d)/ 
e^4 - (2*e^2*x^3 - 3*d*e*x^2 + 6*d^2*x)/e^3) + 1/18*a*e*g*n*(6*d^3*log(e*x 
 + d)/e^4 - (2*e^2*x^3 - 3*d*e*x^2 + 6*d^2*x)/e^3) + 1/54*(6*e*n*(6*d^3*lo 
g(e*x + d)/e^4 - (2*e^2*x^3 - 3*d*e*x^2 + 6*d^2*x)/e^3)*log((e*x + d)^n*c) 
 + (4*e^3*x^3 - 15*d*e^2*x^2 - 18*d^3*log(e*x + d)^2 + 66*d^2*e*x - 66*d^3 
*log(e*x + d))*n^2/e^3)*b*g
 
3.4.79.8 Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 741 vs. \(2 (244) = 488\).

Time = 0.31 (sec) , antiderivative size = 741, normalized size of antiderivative = 2.87 \[ \int x^2 \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (f+g \log \left (c (d+e x)^n\right )\right ) \, dx=\frac {{\left (e x + d\right )}^{3} b g n^{2} \log \left (e x + d\right )^{2}}{3 \, e^{3}} - \frac {{\left (e x + d\right )}^{2} b d g n^{2} \log \left (e x + d\right )^{2}}{e^{3}} + \frac {{\left (e x + d\right )} b d^{2} g n^{2} \log \left (e x + d\right )^{2}}{e^{3}} - \frac {2 \, {\left (e x + d\right )}^{3} b g n^{2} \log \left (e x + d\right )}{9 \, e^{3}} + \frac {{\left (e x + d\right )}^{2} b d g n^{2} \log \left (e x + d\right )}{e^{3}} - \frac {2 \, {\left (e x + d\right )} b d^{2} g n^{2} \log \left (e x + d\right )}{e^{3}} + \frac {2 \, {\left (e x + d\right )}^{3} b g n \log \left (e x + d\right ) \log \left (c\right )}{3 \, e^{3}} - \frac {2 \, {\left (e x + d\right )}^{2} b d g n \log \left (e x + d\right ) \log \left (c\right )}{e^{3}} + \frac {2 \, {\left (e x + d\right )} b d^{2} g n \log \left (e x + d\right ) \log \left (c\right )}{e^{3}} + \frac {2 \, {\left (e x + d\right )}^{3} b g n^{2}}{27 \, e^{3}} - \frac {{\left (e x + d\right )}^{2} b d g n^{2}}{2 \, e^{3}} + \frac {2 \, {\left (e x + d\right )} b d^{2} g n^{2}}{e^{3}} + \frac {{\left (e x + d\right )}^{3} b f n \log \left (e x + d\right )}{3 \, e^{3}} - \frac {{\left (e x + d\right )}^{2} b d f n \log \left (e x + d\right )}{e^{3}} + \frac {{\left (e x + d\right )} b d^{2} f n \log \left (e x + d\right )}{e^{3}} + \frac {{\left (e x + d\right )}^{3} a g n \log \left (e x + d\right )}{3 \, e^{3}} - \frac {{\left (e x + d\right )}^{2} a d g n \log \left (e x + d\right )}{e^{3}} + \frac {{\left (e x + d\right )} a d^{2} g n \log \left (e x + d\right )}{e^{3}} - \frac {2 \, {\left (e x + d\right )}^{3} b g n \log \left (c\right )}{9 \, e^{3}} + \frac {{\left (e x + d\right )}^{2} b d g n \log \left (c\right )}{e^{3}} - \frac {2 \, {\left (e x + d\right )} b d^{2} g n \log \left (c\right )}{e^{3}} + \frac {{\left (e x + d\right )}^{3} b g \log \left (c\right )^{2}}{3 \, e^{3}} - \frac {{\left (e x + d\right )}^{2} b d g \log \left (c\right )^{2}}{e^{3}} + \frac {{\left (e x + d\right )} b d^{2} g \log \left (c\right )^{2}}{e^{3}} - \frac {{\left (e x + d\right )}^{3} b f n}{9 \, e^{3}} + \frac {{\left (e x + d\right )}^{2} b d f n}{2 \, e^{3}} - \frac {{\left (e x + d\right )} b d^{2} f n}{e^{3}} - \frac {{\left (e x + d\right )}^{3} a g n}{9 \, e^{3}} + \frac {{\left (e x + d\right )}^{2} a d g n}{2 \, e^{3}} - \frac {{\left (e x + d\right )} a d^{2} g n}{e^{3}} + \frac {{\left (e x + d\right )}^{3} b f \log \left (c\right )}{3 \, e^{3}} - \frac {{\left (e x + d\right )}^{2} b d f \log \left (c\right )}{e^{3}} + \frac {{\left (e x + d\right )} b d^{2} f \log \left (c\right )}{e^{3}} + \frac {{\left (e x + d\right )}^{3} a g \log \left (c\right )}{3 \, e^{3}} - \frac {{\left (e x + d\right )}^{2} a d g \log \left (c\right )}{e^{3}} + \frac {{\left (e x + d\right )} a d^{2} g \log \left (c\right )}{e^{3}} + \frac {{\left (e x + d\right )}^{3} a f}{3 \, e^{3}} - \frac {{\left (e x + d\right )}^{2} a d f}{e^{3}} + \frac {{\left (e x + d\right )} a d^{2} f}{e^{3}} \]

input
integrate(x^2*(a+b*log(c*(e*x+d)^n))*(f+g*log(c*(e*x+d)^n)),x, algorithm=" 
giac")
 
output
1/3*(e*x + d)^3*b*g*n^2*log(e*x + d)^2/e^3 - (e*x + d)^2*b*d*g*n^2*log(e*x 
 + d)^2/e^3 + (e*x + d)*b*d^2*g*n^2*log(e*x + d)^2/e^3 - 2/9*(e*x + d)^3*b 
*g*n^2*log(e*x + d)/e^3 + (e*x + d)^2*b*d*g*n^2*log(e*x + d)/e^3 - 2*(e*x 
+ d)*b*d^2*g*n^2*log(e*x + d)/e^3 + 2/3*(e*x + d)^3*b*g*n*log(e*x + d)*log 
(c)/e^3 - 2*(e*x + d)^2*b*d*g*n*log(e*x + d)*log(c)/e^3 + 2*(e*x + d)*b*d^ 
2*g*n*log(e*x + d)*log(c)/e^3 + 2/27*(e*x + d)^3*b*g*n^2/e^3 - 1/2*(e*x + 
d)^2*b*d*g*n^2/e^3 + 2*(e*x + d)*b*d^2*g*n^2/e^3 + 1/3*(e*x + d)^3*b*f*n*l 
og(e*x + d)/e^3 - (e*x + d)^2*b*d*f*n*log(e*x + d)/e^3 + (e*x + d)*b*d^2*f 
*n*log(e*x + d)/e^3 + 1/3*(e*x + d)^3*a*g*n*log(e*x + d)/e^3 - (e*x + d)^2 
*a*d*g*n*log(e*x + d)/e^3 + (e*x + d)*a*d^2*g*n*log(e*x + d)/e^3 - 2/9*(e* 
x + d)^3*b*g*n*log(c)/e^3 + (e*x + d)^2*b*d*g*n*log(c)/e^3 - 2*(e*x + d)*b 
*d^2*g*n*log(c)/e^3 + 1/3*(e*x + d)^3*b*g*log(c)^2/e^3 - (e*x + d)^2*b*d*g 
*log(c)^2/e^3 + (e*x + d)*b*d^2*g*log(c)^2/e^3 - 1/9*(e*x + d)^3*b*f*n/e^3 
 + 1/2*(e*x + d)^2*b*d*f*n/e^3 - (e*x + d)*b*d^2*f*n/e^3 - 1/9*(e*x + d)^3 
*a*g*n/e^3 + 1/2*(e*x + d)^2*a*d*g*n/e^3 - (e*x + d)*a*d^2*g*n/e^3 + 1/3*( 
e*x + d)^3*b*f*log(c)/e^3 - (e*x + d)^2*b*d*f*log(c)/e^3 + (e*x + d)*b*d^2 
*f*log(c)/e^3 + 1/3*(e*x + d)^3*a*g*log(c)/e^3 - (e*x + d)^2*a*d*g*log(c)/ 
e^3 + (e*x + d)*a*d^2*g*log(c)/e^3 + 1/3*(e*x + d)^3*a*f/e^3 - (e*x + d)^2 
*a*d*f/e^3 + (e*x + d)*a*d^2*f/e^3
 
3.4.79.9 Mupad [B] (verification not implemented)

Time = 1.47 (sec) , antiderivative size = 323, normalized size of antiderivative = 1.25 \[ \int x^2 \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (f+g \log \left (c (d+e x)^n\right )\right ) \, dx=\ln \left (c\,{\left (d+e\,x\right )}^n\right )\,\left (\frac {x^3\,\left (a\,g+b\,f-\frac {2\,b\,g\,n}{3}\right )}{3}+\frac {x^2\,\left (\frac {3\,d\,\left (a\,g+b\,f\right )}{2\,e}-\frac {d\,\left (9\,a\,g+9\,b\,f-6\,b\,g\,n\right )}{6\,e}\right )}{3}-\frac {d\,x\,\left (\frac {9\,d\,\left (a\,g+b\,f\right )}{e}-\frac {d\,\left (9\,a\,g+9\,b\,f-6\,b\,g\,n\right )}{e}\right )}{9\,e}\right )+x^2\,\left (\frac {d\,\left (3\,a\,f-b\,g\,n^2\right )}{6\,e}-\frac {d\,\left (a\,f-\frac {a\,g\,n}{3}-\frac {b\,f\,n}{3}+\frac {2\,b\,g\,n^2}{9}\right )}{2\,e}\right )+{\ln \left (c\,{\left (d+e\,x\right )}^n\right )}^2\,\left (\frac {b\,g\,x^3}{3}+\frac {b\,d^3\,g}{3\,e^3}\right )-x\,\left (\frac {d\,\left (\frac {d\,\left (3\,a\,f-b\,g\,n^2\right )}{3\,e}-\frac {d\,\left (a\,f-\frac {a\,g\,n}{3}-\frac {b\,f\,n}{3}+\frac {2\,b\,g\,n^2}{9}\right )}{e}\right )}{e}-\frac {2\,b\,d^2\,g\,n^2}{3\,e^2}\right )+x^3\,\left (\frac {a\,f}{3}-\frac {a\,g\,n}{9}-\frac {b\,f\,n}{9}+\frac {2\,b\,g\,n^2}{27}\right )+\frac {\ln \left (d+e\,x\right )\,\left (3\,a\,d^3\,g\,n+3\,b\,d^3\,f\,n-11\,b\,d^3\,g\,n^2\right )}{9\,e^3} \]

input
int(x^2*(a + b*log(c*(d + e*x)^n))*(f + g*log(c*(d + e*x)^n)),x)
 
output
log(c*(d + e*x)^n)*((x^3*(a*g + b*f - (2*b*g*n)/3))/3 + (x^2*((3*d*(a*g + 
b*f))/(2*e) - (d*(9*a*g + 9*b*f - 6*b*g*n))/(6*e)))/3 - (d*x*((9*d*(a*g + 
b*f))/e - (d*(9*a*g + 9*b*f - 6*b*g*n))/e))/(9*e)) + x^2*((d*(3*a*f - b*g* 
n^2))/(6*e) - (d*(a*f - (a*g*n)/3 - (b*f*n)/3 + (2*b*g*n^2)/9))/(2*e)) + l 
og(c*(d + e*x)^n)^2*((b*g*x^3)/3 + (b*d^3*g)/(3*e^3)) - x*((d*((d*(3*a*f - 
 b*g*n^2))/(3*e) - (d*(a*f - (a*g*n)/3 - (b*f*n)/3 + (2*b*g*n^2)/9))/e))/e 
 - (2*b*d^2*g*n^2)/(3*e^2)) + x^3*((a*f)/3 - (a*g*n)/9 - (b*f*n)/9 + (2*b* 
g*n^2)/27) + (log(d + e*x)*(3*a*d^3*g*n + 3*b*d^3*f*n - 11*b*d^3*g*n^2))/( 
9*e^3)